import request from '@/utils/request'

// getAListOfRoles
// page, pagesize
export const getRoles = (page, pagesize) => {
  return request.get('/sys/role', {
    params: {
      page, pagesize
    }
  })
}

export const delRole = id => request.delete(`/sys/role/${id}`)

// data: { name: '', description: '' }
export const addRole = data => request.post(`/sys/role`, data)

// data: { id, name: '', description: '' }
export const updateRole = data => request.put(`/sys/role/${data.id}`, data)
